package com.javasm.mb_store_api_final.sys_control.usercontrol.sys_user.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.List;

import com.javasm.mb_store_api_final.sys_control.rolecontrol.sys_role.dao.SysRoleDao;
import com.javasm.mb_store_api_final.sys_control.rolecontrol.sys_role.entity.SysRole;
import com.javasm.mb_store_api_final.sys_control.usercontrol.authority.entity.Authority;
import com.javasm.mb_store_api_final.sys_control.usercontrol.sys_menu.entity.SysMenu;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.annotation.Resource;

/**
 * (SysUser)表实体类
 *
 * @author makejava
 * @since 2024-07-29 20:19:15
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysUser extends Model<SysUser> implements Serializable{

    private static final long serialVersionUID = 1L;
    //用户id
    @TableId(type = IdType.AUTO)
    private Integer userId;
    //用户账号
    private String userAccount;
    //用户名称
    private String userName;
    //鐢ㄦ埛瀵嗙爜
    private String userPassword;
    //用户性别（1：男 0：女 2：未知）
    private Integer userGender;
    //手机
    private String userPhone;
    //用户邮箱
    private String userEmail;
    //用户状态（0：启用 1：禁用）
    @TableLogic(value = "0" ,delval = "1")
    private Integer userState;
    //备注
    private String remark;
    //岗位id外键
    private String posId;
    //部门id外键
    private Integer departId;
    //角色id外键
    private Integer roleId;
    //创建时间
    private Date createTime;
    
    private Date updateTime;

    @TableField(exist = false)
    private String posName;
    @TableField(exist = false)
    private String departName;
    @TableField(exist = false)
    private String roleName;
    @TableField(exist = false)
    private List<SysMenu> menus;
    @TableField(exist = false)
    private List<Authority> authorities;


    @TableField(exist = false)
    private Integer pageSize;
    @TableField(exist = false)
    private Integer pageNum;

}
